from langchain_community.document_loaders import DirectoryLoader
import asyncio

directory_path = r'D:\00_study\07_python\PythonProject\src' \
            r'\document_loaders\examples'

async def load_directory():
    loader = DirectoryLoader(directory_path,glob="*.md")
    docs = loader.load()
    print(len(docs))

asyncio.run(load_directory())
